package com.hxzy.pojo;


import lombok.Data;

@Data
public class Result {
    private boolean flag;
    private Integer code;
    private String message;
    private Object data;

    public Result() {
    }

    public Result ok() {
        flag = true;
        code = 200;
        message = "成功";
        return this;
    }

    public Result error(String mess) {
        flag = false;
        code = 500;
        message = mess;
        return this;
    }

    public Result addmsg(String mess) {
        message = mess;
        return this;
    }

    public Result addData(Object o) {
        data=o;
        return this;
    }
    public Result setCode(Integer o) {
        code = o;
        return this;
    }


}
